using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._AttributeRules
{
    /// <summary>
    /// <para>Enable Attribute Rules</para>
    /// <para>Enables one or more attribute rules in a dataset</para>
    /// <para>在数据集中启用一个或多个属性规则</para>
    /// </summary>    
    [DisplayName("Enable Attribute Rules")]
    public class EnableAttributeRules : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public EnableAttributeRules()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Table</para>
        /// <para>The table or feature class that contains the attribute rule to be enabled.</para>
        /// <para>包含要启用的属性规则的表或要素类。</para>
        /// </param>
        /// <param name="_names">
        /// <para>Rule Names</para>
        /// <para>The names of the rules to enable for the dataset.</para>
        /// <para>要为数据集启用的规则的名称。</para>
        /// </param>
        public EnableAttributeRules(object _in_table, List<object> _names)
        {
            this._in_table = _in_table;
            this._names = _names;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Enable Attribute Rules";

        public override string CallName => "management.EnableAttributeRules";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_table, _names, _type.GetGPValue(), _out_table];

        /// <summary>
        /// <para>Input Table</para>
        /// <para>The table or feature class that contains the attribute rule to be enabled.</para>
        /// <para>包含要启用的属性规则的表或要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Rule Names</para>
        /// <para>The names of the rules to enable for the dataset.</para>
        /// <para>要为数据集启用的规则的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Rule Names")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _names { get; set; }


        /// <summary>
        /// <para>Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of attribute rules to enable.
        ///   <bulletList>
        ///     <bullet_item>Calculation—Filters the Rule Names parameter to display only calculation type rules.  </bullet_item><para/>
        ///     <bullet_item>Constraint—Filters the Rule Names parameter to display only constraint type rules.  </bullet_item><para/>
        ///     <bullet_item>Validation—Filters the Rule Names parameter to display only validation type rules.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定要启用的属性规则的类型。
        ///   <bulletList>
        ///     <bullet_item>计算 （Calculation） - 过滤规则名称 （Rule Names） 参数以仅显示计算类型规则。</bullet_item><para/>
        ///     <bullet_item>约束 （Constraint） - 过滤“规则名称”（Rule Names） 参数以仅显示约束类型规则。</bullet_item><para/>
        ///     <bullet_item>验证 （Validation） - 过滤规则名称参数以仅显示验证类型规则。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _type_value? _type { get; set; } = null;

        public enum _type_value
        {
            /// <summary>
            /// <para>Calculation</para>
            /// <para>Calculation—Filters the Rule Names parameter to display only calculation type rules.  </para>
            /// <para>计算 （Calculation） - 过滤规则名称 （Rule Names） 参数以仅显示计算类型规则。</para>
            /// </summary>
            [Description("Calculation")]
            [GPEnumValue("CALCULATION")]
            _CALCULATION,

            /// <summary>
            /// <para>Constraint</para>
            /// <para>Constraint—Filters the Rule Names parameter to display only constraint type rules.  </para>
            /// <para>约束 （Constraint） - 过滤“规则名称”（Rule Names） 参数以仅显示约束类型规则。</para>
            /// </summary>
            [Description("Constraint")]
            [GPEnumValue("CONSTRAINT")]
            _CONSTRAINT,

            /// <summary>
            /// <para>Validation</para>
            /// <para>Validation—Filters the Rule Names parameter to display only validation type rules.  </para>
            /// <para>验证 （Validation） - 过滤规则名称参数以仅显示验证类型规则。</para>
            /// </summary>
            [Description("Validation")]
            [GPEnumValue("VALIDATION")]
            _VALIDATION,

        }

        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_table { get; set; }


        public EnableAttributeRules SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}